using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;

namespace Baocao
{
    public partial class rptTHHNMKho : DevExpress.XtraReports.UI.XtraReport
    {
        public rptTHHNMKho()
        {
            InitializeComponent();
            CreateGroup();
        }

        public void CreateGroup()
        {
            GroupField groupField = new GroupField("MaTenVt");
            GroupHeader1.GroupFields.Add(groupField);

            CalculatedField cl = new CalculatedField();
            CalculatedFields.Add(cl);

            cl.DataSource = this.DataSource;
            cl.DataMember = this.DataMember;
            cl.FieldType = FieldType.String;
            cl.Name = "MaTenVt";
            cl.Expression = "[Ma_kho]+' - '+ [Ten_kho]";

            MaTenVt.DataBindings.Add("Text", this.DataSource, "MaTenVt");
            GroupHeader1.Controls.Add(MaTenVt);
        }
    }
}
